package com.authine.cloudpivot.ext.enums.finance;

/**
 * 开票状态
 */
public enum InvoiceStatusEnum {

    /**
     *
     */
    ALL("0", "全部"),
    UNDO("1", "未开票"),
    DOING("2", "开票中"),
    DONE("3", "已开票");

    public String id;
    public String text;

    private InvoiceStatusEnum(String id, String text) {

        this.id = id;
        this.text = text;
    }

    public static InvoiceStatusEnum get(String code) {

        for (InvoiceStatusEnum c : InvoiceStatusEnum.values()) {
            if (c.id.toString().equals(code.toString())) {
                return c;
            }
        }
        return null;
    }
}
